<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../fabric.js"></script>
</head>
<body>
    <canvas id="c" width="800" height="800"></canvas>
    <script type="text/javascript">
        var canvas = new fabric.Canvas('c');
        var rect = new fabric.Rect({
            left: 100,
            top: 100,
            fill: 'red',
            width: 100,
            height: 100
        })
        canvas.add(rect);
    </script>
</body>
</html>